package com.vshining.cryptoki.jna.pkcs11t;

import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;

import java.util.Arrays;
import java.util.List;

/**
 * @author Shining Wang <shiningwang@vshining.com>
 */
@SuppressWarnings("unused")
public class CK_CMS_SIG_PARAMS extends Structure {
    NativeLong certificateHandle;
    Pointer pSigningMechanism;
    Pointer pDigestMechanism;
    Pointer pContentType;
    Pointer pRequestedAttributes;
    NativeLong ulRequestedAttributesLen;
    Pointer pRequiredAttributes;
    NativeLong ulRequiredAttributesLen;

    @Override
    protected List getFieldOrder() {
        return Arrays.asList(
                "certificateHandle",
                "pSigningMechanism",
                "pDigestMechanism",
                "pContentType",
                "pRequestedAttributes",
                "ulRequestedAttributesLen",
                "pRequiredAttributes",
                "ulRequiredAttributesLen"
        );
    }
}
